#include "StdAfx.h"
#include "DbGlobal.h"

const WORD BEGIN_YEAR = 2016;
CDbGlobal::CDbGlobal(void)
{
}


CDbGlobal::~CDbGlobal(void)
{
}

string CDbGlobal::ByteToStr(BYTE btData)
{
	char chBuf[64];
	sprintf(chBuf,"%d",btData);
	return string(chBuf);
}

string CDbGlobal::UintToStr(UINT iData)
{
	char chBuf[256];
	_ultoa(iData,chBuf,10);
	return string(chBuf);
}

string CDbGlobal::IntToStr(int iData)
{
	char chBuf[256] = {0};
	sprintf(chBuf,"%d",iData);
	return string(chBuf);
}

string CDbGlobal::Int64ToStr(__int64 iData)
{
	char chBuf[256];
	_i64toa(iData,chBuf,10);
	return string(chBuf);
}

string CDbGlobal::UInt64ToStr(UINT64 iData)
{
	char chBuf[256];
	_ui64toa(iData,chBuf,10);
	return string(chBuf);
}

std::string CDbGlobal::DoubleToStr( double iData )
{
	char chBuf[256] = {0};
	sprintf(chBuf,"%g",iData);
	return string(chBuf);
}
